const path =require("path")
const MiniCssExtractPlugin = require("mini-css-extract-plugin")
const { devtool } = require("./serve")
module.exports ={
    mode :"production",
    devtool:"source-map",//控制台中报错的位置和源码中位置保持一直
    plugins:[
        new MiniCssExtractPlugin({
            filename:'css/[name].[contenthash:8].css'
        })
    ],
    module:{
        rules:[
            {
                test:/\.css$/,
                use:[MiniCssExtractPlugin.loader,"css-loader"],
            }
        ]
    }
}